Cytosim  PI
Cytoskeleton Simulator
CoupleSet Class Reference

Detailed Description

A Couple is stored in one of 4 NodeList, depending on its state:

  • ffList = free.
  • afList = hand1 attached, hand2 free.
  • faList = hand1 free, hand2 attached.
  • aaList = hand1 and hand2 attached [also called bridge].

The lists are accessible via firstFF() and firstFA(), firstAF() and firstAA. This way, when scanning the Couple, the states of both hands are known, and we can save the corresponding tests. This is very efficient.

A Couple is automatically transfered to the appropriate list, if one of its Hand binds or unbind. This is one role of HandMonitor: HandMonitor::afterAttachment() and HandMonitor::afterDetachment() are called by the Hand, and call CoupleSet::relink().

Inheritance diagram for CoupleSet:
ObjectSet

Public Member Functions

 CoupleSet (Simul &s)
 creator
 
virtual ~CoupleSet ()
 destructor
 
std::string kind () const
 identifies the class
 
PropertynewProperty (const std::string &kind, const std::string &name, Glossary &) const
 create a new property for class kind with given name
 
ObjectnewObject (const std::string &kind, const std::string &prop, Glossary &opt)
 create a new object from the corresponding property
 
ObjectList newObjects (const std::string &kd, const std::string &nm, Glossary &opt)
 create new objects
 
ObjectnewObjectT (const Tag tag, int prop_index)
 construct object
 
CouplefirstFF () const
 first free
 
CouplelastFF () const
 last free
 
CouplefirstAF () const
 first Couple attached by cHand1
 
CouplefirstFA () const
 first Couple attached by cHand2
 
CouplefirstAA () const
 first Couple attached by both hands
 
unsigned int sizeFF () const
 number of free Couples
 
unsigned int sizeAF () const
 number of Couples attached by cHand1
 
unsigned int sizeFA () const
 number of Couples attached by cHand2
 
unsigned int sizeAA () const
 number of Couples attached by both hands
 
unsigned int size () const
 total number of elements
 
Couplefind (Number n) const
 return pointer to the Object of given Number, or zero if not found
 
void link (Object *)
 register into the list
 
ObjectList collect (bool(*func)(Object const *, void *), void *) const
 collect Object for which func(this, val) == true
 
void erase ()
 erase all Object and all Property
 
void mix ()
 mix order of elements
 
void prepare (PropertyList &properties)
 prepare for step()
 
void step (FiberSet const &, FiberGrid const &)
 Monte-Carlo step.
 
void relax ()
 return all reserves to the normal lists
 
void freeze ()
 transfer all object to ice
 
void thaw (bool erase)
 delete objects, or put them back in normal list
 
void write (OutputWrapper &) const
 write More...
 
void foldPosition (const Modulo *) const
 modulo the position (periodic boundary conditions)
 
int bad () const
 debug function
 
- Public Member Functions inherited from ObjectSet
 ObjectSet (Simul &s)
 creator
 
virtual ~ObjectSet ()
 destructor
 
virtual ObjectList newPlacedObjects (const std::string &kind, const std::string &name, Glossary &opt)
 create new objects, translate and rotate them according to specifications in opt More...
 
virtual void add (Object *)
 register Object, and add it at the end of the list
 
void add (ObjectList &)
 remove Object in ObjectList
 
virtual void remove (Object *)
 remove Object
 
void remove (ObjectList &)
 remove Object in ObjectList
 
virtual void relink (Object *)
 unlink and relink object. This places it last in the list More...
 
void erase (Object *)
 remove Object, and delete it
 
Objectfirst () const
 first Object in the list
 
Objectfirst (const Property *) const
 return an Object which has this property More...
 
Objectlast () const
 last Object
 
Objectfind (const Number n) const
 find Object of given serial-number (see Inventoried)
 
ObjectfindObject (long n) const
 return Object with serial-number if ( n > 0 ) or object from the end of the list if ( n <= 0 ) More...
 
void readObject (InputWrapper &, Tag, char pretag)
 read one Object from file More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ObjectSet
static void translateObjects (ObjectList const &, Vector const &)
 apply translation to all Objects in ObjectList More...
 
static void rotateObjects (ObjectList const &, Rotation const &)
 apply rotation to all Objects in ObjectList More...
 
- Public Attributes inherited from ObjectSet
Inventory inventory
 holds pointers to the Objects in a array of Numbers
 
NodeList nodes
 holds pointers to the Objects in a doubly linked list
 
Simulsimul
 the Simul containing this ObjectSet
 
- Protected Member Functions inherited from ObjectSet
void forget (NodeList &)
 remove all nodes in the list from the inventory
 
- Static Protected Member Functions inherited from ObjectSet
static ObjectList collect (const NodeList &, bool(*func)(Object const *, void *), void *)
 collect Object from NodeList for which func(obj, val) == true
 
static void write (const NodeList &, OutputWrapper &)
 write Object in NodeList to file More...
 
static Vector placeObjects (ObjectList const &, Glossary &opt, const Space *)
 place all Objects in ObjectList using the same combinations of translation/rotation More...
 
- Protected Attributes inherited from ObjectSet
NodeList ice
 a list used to store the objects temporarily while a state is imported
 

Member Function Documentation

void write ( OutputWrapper out) const
virtual
Todo:
Write size of uniLists, to export a complete state info

Currently, we cannot restart the simulation for a stored state, if ( couple:fast_diffusion == true ) because it is impossible to know the number of free couple.

Reimplemented from ObjectSet.